import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import {resolve} from 'path'

const pathResolve = dir => resolve(__dirname, dir)
export default defineConfig({
    plugins: [vue()],
    pluginOptions: {
        'style-resources-loader': {
            preProcessor: 'scss',
            patterns: []
        }
    },
    resolve: {
        alias: {
            '@': pathResolve('./src')
        }
    },
    server: {
        port: 8080,
        cors: true  //允许跨域
    }
})
